x86/shadow: don't enable shadow mode with too small a shadow allocation
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Feb 2019 10:30:55 +0000 (11:30 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Feb 2019 10:30:55 +0000 (11:30 +0100)
commitaf25f52a06a82789acf91fd98f71c8563919ab0b
treee090251e94ca86194ba977e6854910c8be17d4ae
parent91f2ad76aa82aebb9ebf0f959a8218429838c0a8
x86/shadow: don't enable shadow mode with too small a shadow allocation

We've had more than one report of host crashes after failed migration,
and in at least one case we've had a hint towards a too far shrunk
shadow allocation pool. Instead of just checking the pool for being
empty, check whether the pool is smaller than what
shadow_set_allocation() would minimally bump it to if it was invoked in
the first place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
master commit: 2634b997afabfdc5a972e07e536dfbc6febb4385
master date: 2018-11-30 12:10:39 +0100
xen/arch/x86/mm/shadow/common.c